package com.sto.stoapp.jpush;

import com.sto.stoapp.http.HttpManager;

/**
 * Created by wj on 2016-12-29.
 */

public class HttpGetControls {

    public static final String URL_CONTROLS=
            "http://192.168.123.90:8080/mdmweb/waybill/miandanInterceptGet.action?orgCode=";
    public static final String URL_ONOFF="http://192.168.123.90:8080/mdmweb/waybill/collectionTradeOnOff.action";
    /**
     * 根据网点编号获取订单管控数据
     * @param orgCode
     * @Param lastTime 上次返回数据的最新时间
     * @return
     */
    public static String getControls(String orgCode ,String lastTime){

        if(orgCode==null || "".equals(orgCode)){
            return null;
        }

        String netUrl=URL_CONTROLS+orgCode+"&queryDate="+lastTime;
        HttpManager httpManager=new HttpManager();
        String result=httpManager.doGetClient(netUrl);
        if(result==null || "".equals(result)){
            return null;
        }

        return result;
    }

    /**
     * 获取代收货款开关
     * @return
     */
    public static String getPayMentOnOff(){

        HttpManager httpManager=new HttpManager();

        String result=httpManager.doGetClient(URL_ONOFF);
        if(result==null || "".equals(result)){
            return null;
        }

        return result;
    }

}
